package com.itheima.pratice.test;

import java.util.ArrayList;

public class StreamTest04 {
    //用stream流方法去除前两个，去除长度大于4，去除重复，然后遍历输出
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>();
        list.add("1");
        list.add("2");
        list.add("3");
        list.add("4");

        list.stream().skip(2).filter(s -> s.length()<=4).distinct().forEach(s -> System.out.println(s));
    }
}
